package com.itheima.work01;

public class Test {
    public static void main(String[] args) {
        fun(new Animal() {
            @Override
            public void show() {
                System.out.println("我是匿名内部类");
            }
        });
        fun(() -> System.out.println("我是lambda表达式")

        );
    }

    public static void fun(Animal a) {

        a.show();
    }
}

interface Animal {

    public void show();

}